def func(x):
    for i in range(0, x):
        x = x / 2
        if x == 1:
            return True

    return False

print(func(32))
print(func(99))

# 方法2
def fun(n):
    return n > 0 and n & (n - 1) == 0

print(fun(32))
print(fun(99))

print(5 & 1)